package com.chinacoal.microservice.api.fallback;

import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;

import com.chinacoal.microservice.api.ForeignSystemTaskClient;
import com.chinacoal.microservice.api.model.ApproveTaskParam;
import com.chinacoal.microservice.api.model.ForeignTaskParam;
import com.chinacoal.microservice.api.model.resource.BusinessData;
import com.chinacoal.microservice.util.result.CodeMsg;
import com.chinacoal.microservice.util.result.Result;

@Component
public class ForeignSystemTaskClientFallback implements ForeignSystemTaskClient {

	@Override
	public Result<BusinessData> getTaskDetail(ForeignTaskParam foreignTaskParam) {
		return Result.error(CodeMsg.FALLBACK);
	}

	@Override
	public Result<Object> approveTask(ApproveTaskParam approveTaskParam) {
		return Result.error(CodeMsg.FALLBACK);
	}

	@Override
	public Result<Object> downloadAttach(ForeignTaskParam foreignTaskParam) {
		return Result.error(CodeMsg.FALLBACK);
	}

	@Override
	public ResponseEntity<byte[]> downloadAttach(String sysCode, String fileName, String filePath, String sysTaskId) {
		return null;
	}

	@Override
	public Result<Object> approveCard(String sysCode, String businessId, String bizCode, String taskId, String instanceId, String approvalOpinion, String opcode, String userCode) {
		return Result.error(CodeMsg.FALLBACK);
	}

}
